<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<div th:replace="dashboard/header :: header"></div>

<body>
	<div class="container-fluid">
		<br/>
		<form id="addForm">
			<div class="form-group row">
				<label class="col-sm-2 col-form-label" for="exampleInputPassword1">检查项</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="headthJob" autocomplete="off"  placeholder="检查项">
				</div>
			</div>

			<div class="form-group row">
				<label class="col-sm-2 col-form-label" for="exampleInputPassword1">检查周期</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="checkLoop" autocomplete="off"  placeholder="检查周期">
				</div>
			</div>

			<div class="form-group row">
				<label class="col-sm-2 col-form-label" for="exampleInputPassword1">检查接口</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="tcpHost" autocomplete="off" placeholder="健康地址">
				</div>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="tcpPort" autocomplete="off" placeholder="健康端口">
				</div>
			</div>
			
			<div class="form-group row">
				<label class="col-sm-2 col-form-label" for="exampleInputPassword1">检查链接</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="headthLink" placeholder="检查链接">
				</div>
			</div>
					
			<div class="form-group row">
				<div class="col-sm-2">检查类型</div>
				<div class="col-sm-10">
					<div class="form-check form-check-inline">
						<input class="form-check-input" type="radio" name="checkType" id="inlineRadio2" value="tcp" checked="checked"> 
						<label class="form-check-label" for="inlineRadio2">TCP</label>
					</div>
					<div class="form-check form-check-inline">
						<input class="form-check-input" type="radio" name="checkType" id="inlineRadio3" value="http"> 
						<label class="form-check-label" for="inlineRadio3">HTTP</label>
					</div>
				</div>
			</div>

			<br/>
			<button type="button" onclick="save()" class="btn btn-primary btn-lg btn-block">保存</button>
		</form>
	</div>

	<script type="text/javascript">
	var options = {
			url : "/manager/headth_add_save",
			type : "post",
			success : function(response, status){
				layer.msg(response.message);
			},
			dataType : "json",
			timeout : 3000
		};

		function save() {
			$('#addForm').ajaxSubmit(options);
		}
	</script>

</body>
</html>
